package com.com.typhoon.consumer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * @author shuya | dongfeng.zdf@alibaba-inc.com
 * @description
 * @date 2018/10/29 上午10:48
 * @description
 * @modified by
 * @since V2.0.0
 */
@Component
@Slf4j
public class Consumer {

    @JmsListener(destination = "sample.queue",containerFactory = "queueListenerFactory")
    public void receiveQueue(String text) {
        log.info("receive message:{}",text);
    }

    @JmsListener(destination = "sample topic",containerFactory = "topicListenerFactory" )
    public void subscribeTopic1(String text) {
        log.info("subscribeTopic1 subscribe message:{}",text);
    }

    @JmsListener(destination = "sample topic",containerFactory = "topicListenerFactory")
    public void subscribeTopic2(String text) {
        log.info("subscribeTopic2 subscribe message:{}",text);
    }

}
